import java.awt.Dimension;
import java.io.File;
 
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
 
public class TestDetachedMagnifyingGlass {
	
	public TestDetachedMagnifyingGlass(File f) {
		ImageIcon i = new ImageIcon(f.getPath());
		JLabel label = new JLabel(i);
		JFrame imageFrame = new JFrame("IMage");
		imageFrame.getContentPane().add(label);
		imageFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		imageFrame.pack();
		imageFrame.setVisible(true);
		
		new PixelMagnifyGlass(label, new Dimension(180,180),2.0);
		// mag.invokeGlass();
	}
	
	public static void main(String[] args) {
		JFileChooser chooser = new JFileChooser();
		chooser.showOpenDialog(null);
		File f = chooser.getSelectedFile();
		new TestDetachedMagnifyingGlass(f);
	}
 
}